<?php
/**
 * This file is form http://findcat.cn
 *
 * @link     https://findcat.cn
 * @email    1476982312@qq.com
 */
namespace Blog\Seeder\Admin\Permission;

use Illuminate\Database\Seeder;
use Database\Seeder\PermissionSeederMaker;

class BlogPermissionSeeder extends Seeder
{
    use PermissionSeederMaker;

    public function run()
    {
        $this->createPermissions('用户列表', 'users', '', '/users');
        $this->createPermissions('用户编辑', 'users.edit', '', '/users/*/edit');
        $this->createPermissions('用户创建', 'users.create', '', '/users/create');

        $this->createPermissions('第三方授权列表', 'user_oauth', '', '/user/oauth');
        $this->createPermissions('第三方授权编辑', 'user_oauth.edit', '', '/user/oauth/*/edit');
        $this->createPermissions('第三方授权创建', 'user_oauth.create', '', '/user/oauth/create');

        $this->createPermissions('公告列表', 'web_site', '', '/web/site');
        $this->createPermissions('公告编辑', 'web_site.edit', '', '/web/site/*/edit');
        $this->createPermissions('公告创建', 'web_site.create', '', '/web/site/create');

        $this->createPermissions('文章列表', 'articles', '', '/articles');
        $this->createPermissions('文章编辑', 'articles.edit', '', '/articles/*/edit');
        $this->createPermissions('文章创建', 'articles.create', '', '/articles/create');

        $this->createPermissions('评论列表', 'comment', '', '/comment');
        $this->createPermissions('评论编辑', 'comment.edit', '', '/comment/*/edit');
        $this->createPermissions('评论创建', 'comment.create', '', '/comment/create');

        $this->createPermissions('每日一句列表', 'every_day_content', '', '/every/day/content');
        $this->createPermissions('每日一句编辑', 'every_day_content.edit', '', '/every/day/content/*/edit');
        $this->createPermissions('每日一句创建', 'every_day_content.create', '', '/every/day/content/create');

        $this->createPermissions('分类列表', 'categories', '', '/categories');
        $this->createPermissions('分类编辑', 'categories.edit', '', '/categories/*/edit');
        $this->createPermissions('分类创建', 'categories.create', '', '/categories/create');

        $this->createPermissions('标签列表', 'tags', '', '/tags');
        $this->createPermissions('标签编辑', 'tags.edit', '', '/tags/*/edit');
        $this->createPermissions('标签创建', 'tags.create', '', '/tags/create');

        $this->createPermissions('友情链接列表', 'friend_link', '', '/friend/link');
        $this->createPermissions('友情链接编辑', 'friend_link.edit', '', '/friend/link/*/edit');
        $this->createPermissions('友情链接创建', 'friend_link.create', '', '/friend/link/create');

        $this->createPermissions('学籍信息列表', 'student_info', '', '/student/info');
        $this->createPermissions('学籍信息编辑', 'student_info.edit', '', '/student/info/*/edit');
        $this->createPermissions('学籍信息创建', 'student_info.create', '', '/student/info/create');

        $this->createPermissions('小工具菜单', 'tool', '', 'tool');

        $this->createPermissions('小工具-农/新历生日订阅列表', 'tool_birthday', '', 'tool/birthday');
        $this->createPermissions('小工具-农/新历生日订阅编辑', 'tool_birthday.edit', '', 'tool/birthday/*/edit');
        $this->createPermissions('小工具-农/新历生日订阅创建', 'tool_birthday.create', '', 'tool/birthday/create');
    }
}
